﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="keywords" content="xx,xx,xx" />
    <meta name="description" content="yyyyyyy" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <meta property="qc:admins" content="70003766576320416375" />
    <meta name="format-detection" content="telephone=no">
    <title>森淼兼职平台</title>
    <link rel="stylesheet" href="css/jquery-ui-1.10.3.css" type="text/css">
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/login.css">

    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>
<body>
<div class="header">
    <div class="container">
    <img src="images/senmiao-merchant-logo.png">
    </div>
</div>
<div class="container-fluid">
  <div class="container">
     <form data-ng-app="myApp" data-ng-controller="myCtrl" class="form" name="form">
         <h5>商家登录</h5>
         <label>
             <input placeholder="用户名" name="userName" type="text" id="userName">
         </label>
         <label>
             <input placeholder="密码" name="password" type="password" id="password">
         </label>
         <label>
             <input style="width: auto;" type="checkbox">记住密码
             <a href="#" style="float: right;color:#22d673  ">忘记密码</a>
         </label>
         <label style="text-align:justify">
              <input  value="登录"  class="btn">
         </label>
     </form>
  </div>

</div>
</body>
<!--<script src="./js/index.js"></script>-->
<script src="js/common/jquery-1.11.1.min.js"></script>
<script src="js/common/bootstrap.min.js"></script>
<script src="js/common/server.js"></script>
<script src="js/md5.js" ></script>
<script>
    document.getElementsByClassName('btn')[0].onclick = function () {
        var username = document.getElementById('userName').value;
        var password = document.getElementById('password').value;
        if(username==''){
            alert('请填写用户名');
        }
        else if(password==''){
            alert('请填写密码');
        }
        else{
            var code = hex_md5(password);
            var url = server + '/server/business/businessRest/login.json';
            var args = {"username": username, "password": code};
            $.post(url, args, function (data) {
                if (data.code ==20000 ) {
                    window.location.replace('./job-summary.html');
                }
                else {
                    alert("登录失败");
                }
            });
        }

    }
</script>
</html>